<?php

session_start(); 

include "webmaster_connect.php";

$feedback_id = $_POST['feedback_id'];

if(isset($_POST['new_status']))

	{
	$new_status = $_POST['new_status'];	
	mysql_query("
	UPDATE customer_feedback SET 
	feedback_status = '$new_status'
	WHERE feedback_id = $feedback_id");
	} 
	
	else

	{
	$current_status = $_POST['current_status'];
	if($current_status == "Accepted")
		
		{
		$new_status = "Rejected";
		} 
		
		else 
		
		{
		$new_status = "Accepted";
		}
	
	mysql_query("
	UPDATE customer_feedback SET 
	feedback_status = '$new_status'
	WHERE feedback_id = $feedback_id");
	}



//echo $new_status;
//echo $feedback_id;

header("Location: webmaster_customer_feedback.php");

?>